<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<link href="${pageContext.request.contextPath}/css/style.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath}/css/table.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath}/dwz/themes/default/style.css" rel="stylesheet" type="text/css" media="screen" />
<link href="${pageContext.request.contextPath}/dwz/themes/css/core.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript" src="${pageContext.request.contextPath}/jquery/jquery-2.1.4.min.js"></script>
<table border="0" cellpadding="0" cellspacing="0" class="table_border">
	<tr>
		<td>
			<table width="100%" border="0" cellpadding="0" cellspacing="0"
				class="table_padding">
				<tr>
					<td><font style="font-size: 12px; color: red;"><strong>提示：点击左边树上的节点查看许可详情</strong></font>
					</td>
					<td width="25" height="26" align="right"></td>
				</tr>
			</table>
		</td>
	</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="table_border">
	<tr>
		<td>
			<table width="100%" border="0" cellpadding="0" cellspacing="0"
				class="table_right">
				<tr>
					<td><font style="font-size: 12px;"><strong>许可详细信息</strong></font>
					</td>
					<td width="25" height="26" align="left"></td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td>
			<table width="100%" border="0" cellspacing="0" class="table_right">
				<tr>
					<td align="center">
						<table border="0" cellpadding="0" cellspacing="0"
							class="box_table" id="box_table2">
							<thead>
								<tr>
									<td>名称：</td>
									<td>${permission.name}</td>
								</tr>
								<tr>
									<td>模块URL：</td>
									<td>${permission.moduleUrl}</td>
								</tr>
								<tr>
									<td>操作URL：</td>
									<td>
										${permission.operationUrl}</td>
								</tr>
								<tr>
									<td>排序号：</td>
									<td>${permission.orderNo}</td>
								</tr>
							</thead>
							<tbody>
							</tbody>
						</table>
						<table border="0" cellpadding="0" cellspacing="0"
							class="operation">
							<thead>
								<tr>
									<td height="24">&nbsp;</td>
								</tr>
							</thead>
						</table>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td>
			<table width="100%" border="0" cellpadding="0" cellspacing="0"
				class="table_padding">
				<tr>
					<td height="21" align="right">
						<table align="left">
							<tr>
								<td width="50px"><a class="button" href="${pageContext.request.contextPath}/permissionController/forwordPage?pagePath=permission/add.jsp"><span>新增</span></a></td>
								<td width="50px"><a class="button" id="delPermission" href="javascript:void(0);"><span>删除</span></a></td>
								<td width="50px"><a class="button" href="${pageContext.request.contextPath}/permissionController/forwordPage?pagePath=permission/edit.jsp"><span>修改</span></a></td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>
<script>
	$("#delPermission").click(function () {

		if(confirm("是否确认删除？")){
			$.post("deletePermission",{id:"${permission.id}"},function (data) {

				if(data.status==true){
					//删除树节点
					let ztree = parent.treeFrame.$.fn.zTree.getZTreeObj("permission_tree");
					var node = ztree.getSelectedNodes();
					ztree.removeNode(node[0]);
				}

			});
		}

	});
</script>